<?php
// +----------------------------------------------------------------------
// | UCToo [ Universal Convergence Technology ]
// +----------------------------------------------------------------------
// | Copyright (c) 2014-2021 https://www.uctoo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Patrick <contact@uctoo.com>
// +----------------------------------------------------------------------

namespace app\controller;


use app\BaseController;
use uctoo\middleware\AppletTest;
use uctoo\middleware\Auth;
use catchAdmin\wechatopen\model\Applet;
use uctoo\ThinkEasyWeChat\OpenPlatform\Ability\Client;
use EasyWeChat\OpenPlatform\Application;
use uctoo\ThinkEasyWeChat\OpenPlatform\Authorizer\MiniProgram\Basic\ServiceProvider;

class Test extends BaseController
{

    protected $middleware = [
        Auth::class,
        AppletTest::class
    ];

    public function index(){
        $this->request->mapp->registerProviders([\uctoo\ThinkEasyWeChat\OpenPlatform\Authorizer\MiniProgram\Basic\ServiceProvider::class]);
        /**
         * @var \app\util\src\OpenPlatform\Authorizer\MiniProgram\Basic\Client $basic
         */
        $basic = $this->request->mapp->basic;
        $res = $basic->checkVerifyNickname('我是谁');
        $this->error('',$res);
    }


}